<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<title>运营平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="renderer" content="webkit">
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/common.css?v=20170207" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/table.css?v=20170117" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/jquery-ui.css" />
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-1.11.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ui.min.js" type="text/javascript"></script>
 <script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/yunIndex.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ym-datePlugin-0.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/global.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/cheshan/js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery.placeholder.min.js"></script>
<script type="text/javascript">
 $(function(){
     $("input").placeholder();
     if (navigator.userAgent.indexOf("Safari") > -1) {
       $("input").css("lineHeight","normal !important");
     };
});
</script>

<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/plugin/select2/select2.css" />
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/plugin/select2/select2.js" type="text/javascript"></script>
<script src="http://img1.isou365.cn/paimai/yunying/js/city.js" type="text/javascript"></script>
<style>
    .xuanzhe ul li .menDao1{width:300px;}
    .xuanzhe ul li .menDao1 a{display:block;background:#cecece;color:#303030;float:left;width:36px; text-align:center;height:20px; line-height:20px; cursor:pointer;}
    .xuanzhe ul li .menDao1 .menHover{ background:#20ab4f;color:#fff;}
</style>
<body>
<div class="header">
<div class="headerCo">
<span>你好,<?php echo ($user_info["real_name"]); ?><a href="<?php echo (WEB_URL); ?>Emp/logout">退出</a></span>
<h1><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_logo.jpg"></h1>
</div>
</div>
<div class="mian">
    <div class="mianL">
    <dl>
        <dd>
            <a id="menu_sy" href="/Index/index" class="shouye">首页</a>
        </dd>
        <?php foreach ($tree_menu as $key => $value): ?>
          <dd>
            <span id="menu_<?php echo ($value['first_char']); ?>" ><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_jia.jpg"><?php echo ($value['name']); ?></span>
            <ul style="display: none;">
                <?php if (!empty($value['children'])): ?>
                    <?php foreach ($value['children'] as $k => $v): ?>
                        <li><a id='menu_<?php echo ($v["first_char"]); ?>' href="<?php echo ($v['url']); ?>"><?php echo ($v['name']); ?></a></li>
                    <?php endforeach ?>
                <?php endif ?>
            </ul>
        <?php endforeach ?>
    </dl>
</div>

<?php $menu = 'shgl.4s店回车'; ?>
<?php $menu=json_encode(explode('.', $menu)); ?>
<script>
    $(function () {
        var cur_menu = '<?php echo ($menu); ?>', cur_menu = eval('[' + cur_menu + ']'), cur_menu = cur_menu[0];
        if (cur_menu == "sy") {
            $("#menu_sy").removeClass('shouye').addClass('current');
        }
        $('#menu_' + cur_menu[0]).click();
        $('#menu_' + cur_menu[0]).find("img").attr("src", "http://img1.isou365.cn/paimai/yunying/images/yun_jie.jpg");
        $(".mianL").css("height", $(document).height() - 95);
        $('#menu_' + cur_menu[1]).addClass('current');
    });
</script>
    <div class="mianR">
        <div class="listBox">
            <div class="yuList">
                <h3 class="cha">到店信息</h3>
                <div class="car_info">
                    <div class="car_no"><span style="font-size:14px;">拍卖单号：<b><?php echo ($detail["order_no"]); ?></b></span></div>
                    <table border="1" width="100%">
                        <tbody>
                            <tr>
                                <td colspan="4" style="background-color:#c1c1c1;font-size:14px;"><span>评估师信息</span></td>
                            </tr>
                            <tr>
                                <td width="11%" style="color:#898b8a;">评估师姓名</td>
                                <td width="39%"><?php echo ($detail["checker_name"]); ?></td>
                                <td width="11%" style="color:#898b8a;">评估师电话</td>
                                <td width="39%"><?php echo ($detail["checker_phone"]); ?></td>
                            </tr>
                        </tbody>
                    </table>

                    <table border="1" width="100%" style="margin-top:10px;">
                        <tbody>
                            <tr>
                                <td colspan="4" style="background-color:#c1c1c1;font-size:14px;">
                                    <span>车辆信息</span>
                                    <span style="float: right;margin-right: 20px;"><a style="color: #0000FF;text-decoration: underline;" href="/Car/report/car_id/<?php echo ($detail["car_id"]); ?>" target="_blank">检测报告</a></span>
                                </td>
                            </tr>
                            <tr>
                                <td width="11%" style="color:#898b8a;">车型</td>
                                <td width="39%"><?php echo ($detail["model"]); ?></td>
                                <td width="11%" style="color:#898b8a;">排放标准</td>
                                <td width="39%"><?php echo ($detail["emission"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">初登日期</td>
                                <td><?php echo ($detail["first_reg_date"]); ?></td>
                                <td style="color:#898b8a;">颜色</td>
                                <td><?php echo ($detail["car_color"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">表显里程</td>
                                <td><?php echo ($detail["pointer_mileage"]); ?>万公里</td>
                                <td style="color:#898b8a;">车况级别</td>
                                <td><?php echo ($detail["composite_state"]); echo ($detail["accident_level"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">车辆注册地</td>
                                <td><?php echo ($detail["first_reg_city"]); ?></td>
                                <td style="color:#898b8a;">车架号</td>
                                <td><?php echo ($detail["vin"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">车牌号</td>
                                <td><?php echo ($detail["plate_prefix"]); echo ($detail["plate_suffix"]); ?></td>
                                <td style="color:#898b8a;">过户限制</td>
                                <td><?php echo ($detail["transfer_limit"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">渠道来源</td>
                                <td>
                                    <?php if($detail["comefrom"] != ''): if(empty($detail['comefrom_url'])):?>
                                        <?php echo ($detail["comefrom"]); ?>
                                        <?php else: ?>
                                        <a href="<?php echo ($detail["comefrom_url"]); ?>" target="_blank" rel="noreferrer"><?php echo ($detail["comefrom"]); ?></a>
                                        <?php endif;?>
                                        <?php else: ?>
                                        未知<?php endif; ?>
                                </td>
                                <td style="color:#898b8a;">所在地</td>
                                <td><?php echo ($detail["location_area"]); ?></td>
                            </tr>
                        </tbody>
                    </table>
                    <table border="1" width="100%" style="margin-top:10px;">
                        <tbody>
                        <tr>
                            <td colspan="4" style="background-color:#c1c1c1;font-size:14px;"><span>拍卖信息</span></td>
                        </tr><tr>
                            <td width="11%" style="color:#898b8a;">竞拍结束时间</td>
                            <td width="39%"><?php echo ($detail["bidding_end_time"]); ?></td>
                            <td width="11%" style="color:#898b8a;">拍卖最高价</td>
                            <td width="39%"><?php echo format_money($detail['highest_price']);?>元</td>
                        </tr>
                        <tr>
                            <td style="color:#898b8a;">保留价</td>
                            <td><?php echo ($detail["reserve_price"]); ?>元</td>
                            <td style="color:#898b8a;">
                                <?php if($detail["is_consult"] == 1): ?>磋商<?php else: ?>确认<?php endif; ?>成交价
                            </td>
                            <td><?php echo format_money($detail['owner_trade_price']);?>元</td>
                        </tr>
                        <tr>
                            <td style="color:#898b8a;">公司补贴</td>
                            <td><?php echo $detail['company_subsidies'] > 0 ? $detail['company_subsidies']."元" : "无" ;?></td>
                            <td style="color:#898b8a;"></td>
                            <td></td>
                        </tr>

                        </tbody>
                    </table>
                    <table border="1" width="100%" style="margin-top:10px;">
                        <tbody>
                        <tr>
                            <td colspan="4" style="background-color:#c1c1c1;font-size:14px;">
                                <span>
                                    付款信息（<?php echo ($detail["pay_status_name"]); ?>）</if>
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td width="11%" style="color:#898b8a;">付款人</td>
                            <td width="39%">
                                <?php echo ($detail["pay_man"]); ?>
                            </td>
                            <td width="11%" style="color:#898b8a;">付款时间</td>
                            <td width="39%">
                                <?php echo ($detail["pay_time"]); ?>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <table border="1" width="100%" style="margin-top:10px;">
                        <tbody>
                            <tr>
                                <td colspan="4" style="background-color:#c1c1c1;font-size:14px;"><span>回车信息</span></td>
                            </tr>
                            <tr>
                                <td width="11%" style="color:#898b8a;">加油要求</td>
                                <td width="39%"><?php echo ($return_detail["refuel_demand"]); ?>元</td>
                                <td width="11%" style="color:#898b8a;">代驾公司</td>
                                <td width="39%"><?php echo ($return_detail["driver_company"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">代驾姓名</td>
                                <td><?php echo ($return_detail["driver_name"]); ?></td>
                                <td style="color:#898b8a;">代驾电话</td>
                                <td><?php echo ($return_detail["driver_phone"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">代驾出发时间</td>
                                <td><?php echo ($return_detail["depart_time"]); ?></td>
                                <td style="color:#898b8a;">开票要求</td>
                                <td><?php echo ($return_detail["invoice"]); ?>元</td>
                            </tr>
                            <tr width="100%">
                                <td style="color:#898b8a;">车钥匙</td>
                                <td><?php echo ($return_detail["carkey"]); ?>把</td>
                                <td style="color:#898b8a;">交付门店</td>
                                <td><?php echo ($return_detail["delive_store_str"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">回车手续</td>
                                <td colspan="4"><?php echo ($return_detail["procedure"]); ?></td>
                            </tr>
                            <!--<tr>-->
                                <!--<td style="color:#898b8a;">手续上传要求</td>-->
                                <!--<td colspan="4"><?php echo ($return_detail["procedures_upload"]); ?></td>-->
                            <!--</tr>-->
                            <tr>
                                <td style="color:#898b8a;">车辆补充说明</td>
                                <td colspan="4"><?php echo ($return_detail["desc"]); ?></td>
                            </tr>
                            <tr>
                                <td style="color:#898b8a;">回车备注</td>
                                <td colspan="4"><?php echo ($return_detail["return_remark"]); ?></td>
                            </tr>
                        </tbody>
                    </table>
                    <br/>
                    <?php if($return_detail['status'] > 1):?>
                    <h3 class="cha">手续上传要求</h3>
                    <div class="transfer-want">
                        <div class="transfer-front clearfix">
                            <?php if(!empty($beforeTransfer)):?>
                            <dl class="clearfix" style="height: 310px;">
                                <dt style="height: 310px;">
                                    <span style="margin-top: 134px;">过户前</span>
                                </dt>
                                <dd>
                                    <ul >
                                        <?php foreach($beforeTransfer as $pb):?>
                                        <li data-id="1" class="clearfix">
                                            <span><?php echo ($pb["certificate_name"]); ?></span>
                                            <input type="button" class="<?php echo ($pb['certificate_image_type']==1 || $pb['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="1" value="照片" >
                                            <input type="button" class="<?php echo ($pb['certificate_image_type']==2 || $pb['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="2" value="扫描件">
                                        </li>
                                        <?php endforeach;?>
                                    </ul>
                                </dd>
                            </dl>
                            <?php else:?>
                            <dl class="clearfix" style="height: 310px;">
                                <dt style="height: 310px;">
                                    <span style="margin-top: 134px;">过户前</span>
                                </dt>
                                <dd class="not-upload">
                                    无上传要求
                                </dd>
                            </dl>
                            <?php endif;?>
                            <?php if(!empty($afterTransfer)):?>
                            <dl class="clearfix" style="margin-left:25px;">
                                <dt style="height: 310px;"><span style="margin-top: 134px;">过户后</span></dt>
                                <dd>
                                    <ul>
                                        <?php foreach($afterTransfer as $pa):?>
                                        <li data-id="2" class="clearfix">
                                            <span><?php echo ($pa["certificate_name"]); ?></span>
                                            <input type="button" class="<?php echo ($pa['certificate_image_type']==1 || $pa['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="1" value="照片" >
                                            <input type="button" class="<?php echo ($pa['certificate_image_type']==2 || $pa['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="2" value="扫描件">
                                        </li>
                                        <?php endforeach;?>
                                    </ul>
                                </dd>
                            </dl>
                            <?php else:?>
                            <dl class="clearfix" style="height: 310px;">
                                <dt style="height: 310px;">
                                    <span style="margin-top: 134px;">过户后</span>
                                </dt>
                                <dd class="not-upload">
                                    无上传要求
                                </dd>
                            </dl>
                            <?php endif;?>
                        </div>
                    </div>
                    <?php endif;?>
                    <?php if($return_detail["status"] == 2): ?><table border="1" width="100%" style="margin-top:10px;">
                            <tbody>
                                <tr>
                                    <td colspan="4" style="background-color:#c1c1c1;font-size:14px;"><span>到店信息</span></td>
                                </tr><tr>
                                    <td width="11%" style="color:#898b8a;">车辆到店时间</td>
                                    <td width="39%"><?php echo ($return_detail["arrival_time"]); ?></td>

                                </tr>
                                <tr>
                                    <td style="color:#898b8a;">到店备注</td>
                                    <td><?php echo ($return_detail["arrival_remark"]); ?></td>
                                </tr>
                            </tbody>
                        </table><?php endif; ?>
                </div>
            </div>
        </div>

        <?php if($return_detail["status"] == 1): ?><div class="shop_details">
                <ul>
                    <li>
                        <span>*车辆到店时间</span>
                        <em><input id="arrival_time" type="text" name="trace_start_time" value="" placeholder="请选择车辆到店时间" readonly="" class="driving_time"></em>
                    </li>
                    <li>
                        <span>备注</span>
                        <textarea id="remark" class="remarks_text"></textarea>
                    </li>
                </ul>
            </div>
            <div class="yongBtn">
                <input id="submitForm" type="button" value="确定" class="queding">
                <input type="button" onclick="history.back();" class="quxiao" value="返回">
            </div>
        <?php else: ?>
            <div class="yongBtn1">
                <input type="button" onclick="window.close();" class="quxiao" value="关闭">
            </div><?php endif; ?>
    </div>
    <div class="clear"></div>
</div>
<script>
    $(document).ready(function(){
        $(".driving_time").ymdateplugin({
            showTimePanel: true,
            changeMonth: true,
            changeYear: true
        });


        $('#submitForm').click(function() {

            var arrival_time = $("#arrival_time").val();
            if(arrival_time==''){
                shibai_alert2("请选择车辆到店时间时间!");
                return;
            }

            var remark = $("#remark").val();
            var postData = {
                "order_id":"<?php echo ($detail["order_id"]); ?>",
                "arrival_time":arrival_time,
                "remark":remark
            };
            $(".yunBei").css("display",'block');
            $(".loading").fadeIn();
            $.post('/CarReturn/confirm_arrive',postData,function (data) {
                if(data.code!=200){
                    $(".loading").hide()
                    shibai_alert2(data.msg,1500)
                    return false;
                }
                btn_alert("操作成功",1500,function () {
                    window.location.href="/CarReturn/index";
                });
            },'json');
        });
    });
</script>
<div class="yunBei"></div>
<div class="loading"></div>
</body>
</html>